using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using mebc.tests.toDictionary;
using NUnit.Framework;

namespace mebc.tests.boards
{
    [TestFixture]
    public class demo_ToDictionary
    {
        [Test]
        public void Run()
        {
            var sut = new ToDictionaryMainboard();
            Dictionary<string, string> dict = null;
            sut.OutputPipe += _ => dict = (Dictionary<string, string>) _.Value;

            sut.InputPipe(new Message<string> {Value = "a=1;b=2"});

            Assert.AreEqual(new Dictionary<string, string> { { "a", "1" }, { "b", "2" } }, dict);
        }
    }
}